<?php
return array(
	'attributeLabels' => array(
		'parent_id' => '上级分类',
		'parent.name' => '上级分类',
	),	
	
	'rules'=>array(
		array('name,parent_id','required'),
	),
	
	'cascade' => array(
		'relateds'
	),
	
	'relations' => array(
		'relateds' => array(ActiveRecord::HAS_MANY, 'ProviderGoodsCateRelated', 'cate_id'),
	),
	
	'behaviors' => array(
		'uidResolver' => array(
			'class' => 'application.behaviors.LyAutoIdBehavior',
			'uid' => 'worker_id'
		),
		'tree' => array(
			'class' => 'lib.behaviors.ar.tree.CLRTreeBehavior',
			'maxLayer' => 2,
		),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);